function fn(NewState) {
    NewState.allCount = NewState.list.reduce((prev, next) => {
        if (next.isCheck) {
            return prev += next.count
        } else {
            return prev
        }
    }, 0)

    NewState.allPrice = NewState.list.reduce((prev, next) => {
        if (next.isCheck) {
            return prev += next.count * next.price
        } else {
            return prev
        }
    }, 0)
}

export default fn